// 设置异步间隔延时
export function delay(interval = 0){
    return new Promise(resolve =>{
        let timer = setTimeout(() =>{
            clearTimeout(timer);
            resolve();
        },interval)
    })
}
// 把文件按照二进制文件读取
export function readFile(file){
    return new Promise(resolve =>{
        let reader = new FileReader();
        reader.readAsBinaryString(file);
        reader.onload = ev =>{
            resolve(ev.target.result);
        }
    })
}

// 表的字段
export let character = {
    dName:{
        text:'部门名称',
        type:"string"
    },
    sDepartment:{
        text:"上级部门",
        type:"string"
    },
    pCharge:{
        text:"部门负责人",
        type:"string"
    }
}